/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.model.objects;

/**
 * <p>This abstract class is a base class for all XRE Animation Resource Objects. It is a simple JavaBean (POJO) that
 * provides getters and setters for all private attributes and performs no argument validation in the setters.</p>
 *
 * <p><strong>Thread safety:</strong> This class is mutable and not thread safe.</p>
 *
 * @author saarixx, jmn
 * @version 1.0
 */
public abstract class XREAnimationResource extends XREResource {

    /**
     * <p>The duration that animation should run.</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private int duration;

    /**
     * <p>The easing function to use.</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private XREAnimationEasingFunction easing = XREAnimationEasingFunction.LINEAR_IN;

    /**
     * <p>Creates new instance of {@link XREAnimationResource} class.</p>
     */
    protected XREAnimationResource() {
        // empty constructor
    }

    /**
     * <p>Retrieves the duration that animation should run.</p>
     *
     * @return the duration that animation should run
     */
    public int getDuration() {
        return duration;
    }

    /**
     * <p>Sets the duration that animation should run.</p>
     *
     * @param duration the duration that animation should run
     */
    public void setDuration(int duration) {
        this.duration = duration;
    }

    /**
     * <p>Retrieves the easing function to use.</p>
     *
     * @return the easing function to use
     */
    public XREAnimationEasingFunction getEasing() {
        return easing;
    }

    /**
     * <p>Sets the easing function to use.</p>
     *
     * @param easing the easing function to use
     */
    public void setEasing(XREAnimationEasingFunction easing) {
        this.easing = easing;
    }
}

